function timestampToTime(timestamp) {
    timestamp = timestamp ? timestamp : null;
    let date = new Date(timestamp);
    let Y = date.getFullYear();
    let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1);
    let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate());
    let h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours());
    let m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes());
    let newY, newYear
    Y === new Date().getFullYear() ? newY = '' : newY = Y + '年'
    Y === new Date().getFullYear() ? newYear = '' : newYear = Y + '-'
    return [Y + '年' + M + '月' + D + '日', h + ':' + m, newY + M + '月' + D + '日', newYear + M + '-' + D]
} export default timestampToTime